Skip to content

DOCSP-46221: Atlas SDK for Go Monitoring & Logging scripts for Atlas Architecture Center #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
May 15, 2025

Conversation

cbullinger
Copy link
Collaborator

Jira Ticket

DOCSP-46221

Description of Changes

IA Changes

  • Updated root-level directories to reflect code example categories
  • Updated /go and /java to support multiple sub-directories

Atlas SDK for Go

  • Added new /go/atlas-sdk-go project
  • Generated Bluehawked snippets for:
    • Full and abbreviated code examples for getting logs
    • Full and abbreviated code examples for getting process metrics and host metrics

TODO (outside of this ticket)

  • Copy selected project files to target repo
  • Running tests on PR push

@@ -0,0 +1,69 @@
// :snippet-start: config-loader-function-full-example

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can reuse instead env-var names from Terraform function:
func setDefaultValuesWithValidations(ctx context.Context, data *tfMongodbAtlasProviderModel, resp *provider.ConfigureResponse) tfMongodbAtlasProviderModel {

This way it is easier for users to transition between tools

)

type Config struct {
AtlasBaseURL string `json:"ATLAS_BASE_URL"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, it is simpler to only use the MONGODB_ATLAS_BASE_URL than using hostname, port, etc.

@cbullinger cbullinger force-pushed the docsp-46221 branch 4 times, most recently from fb5d475 to 79ae2df Compare May 5, 2025 17:19
Copy link
Collaborator

@dacharyc dacharyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this! It's a big deliverable in a new problem domain for our team, with some added complications re: snippets/copied app. I think you've done a great job of breaking it all down here.

I've got a handful of nitpicks, style questions, and minor suggestions, and one issue re: imports in the generated app copy that is preventing it from compiling unless I manually delete them. Marking this PR as "request changes" only because of that issue; everything else is a suggestion/nitpick/subjective.

go run cmd/get_logs/main.go
```

## Set up
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a Q - should this Set up section also be in the public README? Seems it would be useful to give folks info about the service account prereq, and info about where/how to set env variables and config file information.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re. this and following comment, I do have a version of this content in the public README draft, but I'll include it in a separate PR. I didn't want it to keep me from dragging this PR out even longer 😓

@cbullinger cbullinger requested a review from dacharyc May 7, 2025 20:37
Copy link
Collaborator

@dacharyc dacharyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work with the updates. This is looking good. LGTM! 🚢

@cbullinger cbullinger merged commit afd7a07 into mongodb:main May 15, 2025
0 of 8 checks passed
dacharyc pushed a commit to dacharyc/docs-code-examples that referenced this pull request Jun 24, 2025
DOCSP-46221: Atlas SDK for Go Monitoring & Logging scripts for Atlas Architecture Center
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants